import request from '@/config/axios'

// 共建专业 VO
export interface MajInfoVO {
  majId: number // 专业id
  majName: string // 专业名称
}

// 共建专业 API
export const MajInfoApi = {
  // 查询共建专业分页
  getMajInfoPage: async (params: any) => {
    return await request.get({ url: `/dbit/maj-info/page`, params })
  },

  // 查询共建专业详情
  getMajInfo: async (id: number) => {
    return await request.get({ url: `/dbit/maj-info/get?id=` + id })
  },

  // 新增共建专业
  createMajInfo: async (data: MajInfoVO) => {
    return await request.post({ url: `/dbit/maj-info/create`, data })
  },

  // 修改共建专业
  updateMajInfo: async (data: MajInfoVO) => {
    return await request.put({ url: `/dbit/maj-info/update`, data })
  },

  // 删除共建专业
  deleteMajInfo: async (id: number) => {
    return await request.delete({ url: `/dbit/maj-info/delete?id=` + id })
  },

  // 导出共建专业 Excel
  exportMajInfo: async (params) => {
    return await request.download({ url: `/dbit/maj-info/export-excel`, params })
  },
}